package shopping;

import java.util.ArrayList;

public class Cartitemarray {
	User user;
	

	int num;
	Goods goods;
	double OneSortPrice;
	double Allsum;
	

	
public Cartitemarray(){
	
}
	public Cartitemarray(Goods goods,int num,User user) {
		this.goods = goods;
		this.num = num;
		this.OneSortPrice=goods.getPrice()*num;
		
		user.shoppingcart.cartitem.add(this);
		

		this.Allsum = user.shoppingcart.getAllSum();
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}
	

}

